/**
 * -------------------------------------------------------------*
 *   National Audit Office of the People’s Republic Of China                      *
 *                                                              *
 *                                                              *
 *  This work contains confidential business information        *
 *  and intellectual property of CNAO.                        *
 *  All rights reserved.                                        *
 * -------------------------------------------------------------*
 */
package org.transfer.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.transfer.model.FinanceTemplate;
import org.transfer.model.RegisterTable;

@Mapper
public interface RegisterTableDao {

	public RegisterTable getTable(RegisterTable registerTable);

	// 取财务系统名称
	@Select("SELECT AREA_CODE areaCode,AREA_NAME areaName,COMPANY_CODE companyCode,COMPANY_NAME companyName,DATA_TYPE dataType,DATA_NAME dataName,SYS_NAME sysName FROM 财务TEST.SYS_REGISTER_TABLE WHERE AREA_CODE=#{areaCode} AND COMPANY_CODE=#{companyCode} AND COMPANY_NAME=#{companyName}")
	List<RegisterTable> findFinanceList(RegisterTable param);

	// 基础表_财务类_电子账簿信息表
	int insertAccountBook(List<Map<String, Object>> list);

	// 基础表_财务类_辅助信息表
	int insertAssist(List<Map<String, Object>> list);

	// 基础表_财务类_辅助余额表
	int insertAssistBalance(List<Map<String, Object>> list);

	// 基础表_财务类_会计科目表
	int insertAccount(List<Map<String, Object>> list);

	// 基础表_财务类_记账凭证表
	int insertVoucher(List<Map<String, Object>> list);

	// 基础表_财务类_记账凭证辅助明细表
	int insertAssistDetail(List<Map<String, Object>> list);

	// 基础表_财务类_科目余额及发生额表
	int insertAccountBalance(List<Map<String, Object>> list);

	public List<FinanceTemplate> findTemplateList(@Param("name") String name, @Param("dbType") String dbType);

	int deleteFinanceTables(RegisterTable param);

	int deleteAccountBook(RegisterTable param);
}
